<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<script>
    _HOST_ = "//mooc1.chaoxing.com";
    _CP_ = "/mooc-ans";
    _HOST_CP1_ = "//mooc1.chaoxing.com/mooc-ans";
    // _HOST_CP2_ = _HOST_ + _CP_;
    _HOST_CP2_ = _CP_;
</script><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>作业详情</title>
<link rel="stylesheet" type="text/css" href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/pop.css"/>
<link rel="stylesheet" type="text/css" href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/common.css?v=2024-1210-1800" />
<link rel="stylesheet" type="text/css" href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/marking_icon.css" />
<link rel="stylesheet" type="text/css" href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/viewStudent.css?v=2024-1203-2100" />
<link rel="stylesheet" type="text/css" href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/taskStudent_pop.css" />
<link rel="stylesheet" type="text/css" href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/oralTest.css?v=2022-0727-1100" />
<link rel="stylesheet" type="text/css" href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/animationQuestion.css" />
<style type="text/css">
	.classtips{margin: 30px 40px 0;padding:10px 20px;border: 1px solid #FBE59A;background: #FEFBE8;border-radius: 4px;font-size:14px;color:#474C59;}
	.classtips .tipsPop{display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:8px;background:#ff0}
	.classtips .tipsPop img{display:block;width:100%;height:100%}
	/*知识点样式*/
	.colorGray{color:#8A8B99}
	.knowledgeList li{float:left;padding:6px 14px;background:#fff;border:solid 1px #DADFE5;border-radius:4px;margin-right:16px;font-size:12px;line-height:18px;box-sizing:border-box;overflow: hidden;
		text-overflow: ellipsis;white-space: nowrap;max-width:110px;margin-bottom:16px}
	.knowledgePointBx {margin-top:16px}
	.knowledgePointBx .answerCon{width:calc(100% - 70px)}
	.knowledgePointBx .answerCon ul li{padding:0;max-width:none}
	.knowledgePointBx .answerCon ul li a{padding:6px 14px;display:block;max-width:300px;color:#8A8B99;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
	.knowledgePointBx .answerCon ul li a:hover{color:#3A8BFF}
	/*知识点样式*/
	.selfMarkScore{line-height: 29px;padding: 0 10px;height: 29px;background: rgba(251, 251, 251, 1);border-radius: 99px;border: 1px solid #F4F5F6;margin-top: 55px;}
</style>
<link href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/font.css?v=2023-0908-1500" rel="stylesheet" type="text/css" /><link href="//mooc1.chaoxing.com/mooc-ans/css/questionBank/questionBankUsual.css?v=2019-1120-1400" type="text/css" rel="stylesheet"/><script type="text/javascript" src="//mooc-res1.chaoxing.com/mooc-ans/js/common/jquery.min.js"></script>
<script type="text/javascript" src="//mooc-res1.chaoxing.com/mooc-ans/js/common/jquery-migrate.min.js"></script><script type="text/javascript" src="//mooc1.chaoxing.com/mooc-ans/js/jquery.nicescroll.min.js"></script>
<script type="text/javascript" src="//mooc1.chaoxing.com/mooc-ans/mooc2/js/poptoast.js"></script>
<script type="text/javascript" src="//mooc1.chaoxing.com/mooc-ans/mooc2/js/poplayout.js?v=2022-0218-1500"></script>
<script type="text/javascript" src="//mooc1.chaoxing.com/mooc-ans/mooc2/js/viewStudent.js"></script>
<script src="//mooc1.chaoxing.com/mooc-ans/space/work/js/attach-mark.js?v=2023-1026-1600"></script><script type="text/javascript" src="//mooc1.chaoxing.com/mooc-ans/mooc2/js/animation-question.js?v=2023-0216-1800"></script>
<script type="text/javascript">window.SUPPORT_AUDIO_SETTING = true; window.SUPPORT_AUDIO_CONTROL = true;</script>
<script src="//mooc1.chaoxing.com/mooc-ans/js/work/work-audio-playtimes.js?v=2024-0104-1500"></script>

<input type="hidden" id="fromDevice" value="mooc2"/>

<div class="maskDiv" style="display:none;z-index:1000;" id="audioLimitTimesWinNew">
    <div class="popSetDiv wid440">
        <div class="popHead RadisTop">
            <a href="javascript:;" class="popClose fr" onclick="$('#audioLimitTimesWinNew').fullFadeOut();">
                <img src="//mooc1.chaoxing.com/mooc-ans/mooc2/images/popClose.png"/>
            </a>
            <p class="fl fs18 color1">提示</p>
        </div>
        <div class="het62"></div>
        <p class="popWord fs16 color2 audioLimitTimesTip">此附件仅支持打开 <span></span> 次，你已打开 <span></span> 次，不能再次打开</p>
        <div class="popBottom RadisBom">
            <a href="javascript:;" class="jb_btn jb_btn_92 fr fs14" onclick="$('#audioLimitTimesWinNew').fullFadeOut();">知道了</a>
        </div>
        <div class="het72"></div>
    </div>
</div>

<div class="AlertCon02" style="width:400px; height:200px;display:none;" id="audioLimitTimesWin">
    <h3 class="clearfix">
        <a href="javascript:;" class="closed02 fr" onclick="WAY.box.hide();$('#audioLimitTimesWin').css('display','none')" style="margin-top:1px;"></a>
    </h3>
    <div class="con03">
        <p class="audioLimitTimesTip" style="margin-top:16px;text-align:left;">此附件仅支持打开 <span></span> 次，你已打开 <span></span> 次，不能再次打开</p>
        <div style="margin-top:60px;">
            <a class="bluebtn" href="javascript:;" onclick="WAY.box.hide();$('#audioLimitTimesWin').css('display','none')">知道了</a>
        </div>
    </div>
</div></head>
<body>
<script src="//mooc1.chaoxing.com/mooc-ans/space/work/js/preview-attach.js?v=2023-1102-1900"></script><link href="//mooc1.chaoxing.com/mooc-ans/css/work/viewer.min.css?v=2021-0830-1700" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="//mooc1.chaoxing.com/mooc-ans/js/jquery.md5.js"></script>
<script type="text/javascript" src="//mooc1.chaoxing.com/mooc-ans/space/work/js/viewer-jquery.min.js?v=2024-0124-0200"></script>
<script type="text/javascript">
try{
	$(function(){
		var imgList = $(".TiMu").find("div img:not(.workAttach img, .attach img, .attachNew img, .stuAnswerArea img, .popClose img, .ans-formula-moudle, .no_view)");
		for (var i = 0, len = imgList.size(); i < len; i++) {
			 var src = imgList.eq(i).attr("src");
			 if(src){
    			var index = src.indexOf("375_1024");
    			if (index != -1) {
    				src = src.replace("375_1024", "origin");
    			}
                 var index2 = src.indexOf("750_1024");
                 if (index2 != -1) {
                     src = src.replace("750_1024", "origin");
                 }
    			imgList.eq(i).attr("data-original", src);
		   }
		}
        $(".TiMu").find("div img:not(.workAttach img, .attach img, .attachNew img, .stuAnswerArea img, .popClose img, .no_view)").viewer({
			url : 'data-original',
		});
	})
  }catch(error){}
</script>


<input type="hidden" id="courseId" value="245175844" />
<input type="hidden" id="classId" value="103502387" />
<input type="hidden" id="cpi" value="211972379"/>
<input type="hidden" id="workId" value="39636971" />
<input type="hidden" id="answerId" value="54558999"/>
<input type="hidden" id="enc" value="240cb44c3fb934bf9b9c81a0f755b059"/>
<input type="hidden" id="creatorId" value="211972379"/>

<div class="subNav">作业详情</div>
<div class="het40"></div>
<div class="fanyaMarking TiMu" id="fanyaMarking">
	<div class="fanyaMarking_left whiteBg">
		<div class="borderBom padBom20 detailsHead" style="overflow: hidden;">
						<h2 class="mark_title" tabindex="0">分布式应用程序协调服务 Zookeeper</h2>
			<div class="infoHead fl" tabindex="0">
				<span>题量: 10</span>
				<span>满分: 100</span>
				<div style="margin-top: 10px;margin-left: -9px;">
					<p class="rightBord">作答时间:<em>12-10 10:36</em>至<em>2025-01-15 10:36</em></p>
									</div>
			</div>

			
						<span class="resultNum" tabindex="0"><i class="custom-style">100</i>分</span>
					</div>
				
				
							<div class="mark_table padTop60 ans-cc fontLabel">
								
					
					<div class="mark_item">
						                            <h2 class="type_tit" tabindex="0">一. 单选题（共10题，100分）</h2>
																							
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121478" data="404121478" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">1. <span class="colorShallow">(单选题)</span>Zookeeper 的主要功能是</h3>
																
																	<ul class="mark_letter colorDeep">
																																							<li tabindex="0">A. 数据存储</li>
																																																																																	<li tabindex="0">B. 集群管理和协调</li>
																																							<li tabindex="0">C. 分布式计算</li>
																																							<li tabindex="0">D. 数据分析</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> B</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:集群管理和协调; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> B</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:集群管理和协调; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121479" data="404121479" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">2. <span class="colorShallow">(单选题)</span>Zookeeper 使用的协议是</h3>
																
																	<ul class="mark_letter colorDeep">
																																							<li tabindex="0">A. TCP</li>
																																							<li tabindex="0">B. HTTP</li>
																																																																																	<li tabindex="0">C. ZAB</li>
																																							<li tabindex="0">D. RPC</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> C</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:ZAB; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> C</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:ZAB; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121480" data="404121480" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">3. <span class="colorShallow">(单选题)</span>Zookeeper 中的数据结构是</h3>
																
																	<ul class="mark_letter colorDeep">
																																																																																	<li tabindex="0">A. 树形结构</li>
																																							<li tabindex="0">B. 图形结构</li>
																																							<li tabindex="0">C. 列式结构</li>
																																							<li tabindex="0">D. 链表结构</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> A</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:树形结构; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> A</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:树形结构; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121481" data="404121481" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">4. <span class="colorShallow">(单选题)</span>Zookeeper 的“顺序节点”意味着</h3>
																
																	<ul class="mark_letter colorDeep">
																																																																																	<li tabindex="0">A. 节点的编号按时间顺序分配</li>
																																							<li tabindex="0">B. 节点的名称有顺序</li>
																																							<li tabindex="0">C. 节点只能按顺序写入</li>
																																							<li tabindex="0">D. 节点的顺序由客户端决定</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> A</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:节点的编号按时间顺序分配; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> A</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:节点的编号按时间顺序分配; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121482" data="404121482" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">5. <span class="colorShallow">(单选题)</span>Zookeeper 的数据存储是</h3>
																
																	<ul class="mark_letter colorDeep">
																																							<li tabindex="0">A. 永久存储</li>
																																																																																	<li tabindex="0">B. 临时存储</li>
																																							<li tabindex="0">C. 只读存储</li>
																																							<li tabindex="0">D. 不持久化</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> B</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:临时存储; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> B</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:临时存储; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121483" data="404121483" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">6. <span class="colorShallow">(单选题)</span>Zookeeper 中如果一个节点不可用，客户端会</h3>
																
																	<ul class="mark_letter colorDeep">
																																							<li tabindex="0">A. 阻塞直到节点恢复</li>
																																																																																	<li tabindex="0">B. 自动重连到其他节点</li>
																																							<li tabindex="0">C. 报错并退出</li>
																																							<li tabindex="0">D. 继续操作</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> B</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:自动重连到其他节点; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> B</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:自动重连到其他节点; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121484" data="404121484" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">7. <span class="colorShallow">(单选题)</span>Zookeeper 中的“watcher”机制是</h3>
																
																	<ul class="mark_letter colorDeep">
																																							<li tabindex="0">A. 数据库的自动备份</li>
																																																																																	<li tabindex="0">B. 监听节点的数据变化</li>
																																							<li tabindex="0">C. 负责协调任务的执行</li>
																																							<li tabindex="0">D. 控制并发访问</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> B</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:监听节点的数据变化; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> B</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:监听节点的数据变化; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121486" data="404121486" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">8. <span class="colorShallow">(单选题)</span>Zookeeper 中的“Leader”节点负责</h3>
																
																	<ul class="mark_letter colorDeep">
																																							<li tabindex="0">A. 数据存储</li>
																																																																																	<li tabindex="0">B. 协调和管理节点</li>
																																							<li tabindex="0">C. 启动服务</li>
																																							<li tabindex="0">D. 处理客户端请求</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> B</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:协调和管理节点; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> B</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:协调和管理节点; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121487" data="404121487" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">9. <span class="colorShallow">(单选题)</span>Zookeeper 的客户端通过以下方式与集群中的服务器通信</h3>
																
																	<ul class="mark_letter colorDeep">
																																							<li tabindex="0">A. 使用共享内存</li>
																																																																																	<li tabindex="0">B. &nbsp;使用 RPC</li>
																																							<li tabindex="0">C. 使用消息队列</li>
																																							<li tabindex="0">D. 使用 HTTP</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> B</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">: 使用 RPC; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> B</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">: 使用 RPC; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
																		
						
							<div class="marBom60 questionLi singleQuesId" style="word-wrap: break-word;" id="question404121489" data="404121489" tabindex="0" aria-label="题目详情">
								<div class="aiArea">
								<div class="aiAreaContent">
																	<h3 class="mark_name colorDeep" tabindex="0">10. <span class="colorShallow">(单选题)</span>Zookeeper 中的节点叫做</h3>
																
																	<ul class="mark_letter colorDeep">
																																							<li tabindex="0">A. Region</li>
																																																																																	<li tabindex="0">B. ZNode</li>
																																							<li tabindex="0">C. FileNode</li>
																																							<li tabindex="0">D. DataNode</li>
																		</ul>
									
									<div class="mark_answer" tabindex="0">
										<div class="mark_key clearfix">
											<span class="colorDeep marginRight40 fl"><i class="fontWeight custom-style">我的答案:</i> B</span>
											<span class="element-invisible-hidden colorDeep marginRight40 fl">:ZNode; </span>
																						<span class="colorGreen marginRight40 fl"><i class="fontWeight custom-style">正确答案:</i> B</span>
											<span class="element-invisible-hidden colorGreen marginRight40 fl">:ZNode; </span>
																					</div>
										<div class="mark_score">
											<div class=" fl catalog_tishi80">
																								<div class="mark_judge_name">
																										<span class="marking_dui"></span>
																									</div>
																							</div>
																						<div class="totalScore fr"><i class="custom-style">10</i>分</div>
																					</div>

																				<!--显示知识点-->
    <!--显示知识点-->
									</div>

																</div>
																</div>
							</div>
											</div>
							</div>
			</div>
	
		<div class="fanyaMarking_right" id="rightHeight">
		<div class="topicNumber" id="topicNumberScroll" tabindex="0" aria-label="答题卡">
												
						
                        <div class="topicNumber_checkbox colorDeep fs14" tabindex="0">
														一. 单选题（100分）                        </div>
                        <ul class="topicNumber_list clearfix" tabindex="-1" aria-hidden="true" >
							                                <li id="answerSheet404121478" data="404121478" class="active"  tabindex="0" role="option">1</li>
							                                <li id="answerSheet404121479" data="404121479" class="active"  tabindex="0" role="option">2</li>
							                                <li id="answerSheet404121480" data="404121480" class="active"  tabindex="0" role="option">3</li>
							                                <li id="answerSheet404121481" data="404121481" class="active"  tabindex="0" role="option">4</li>
							                                <li id="answerSheet404121482" data="404121482" class="active"  tabindex="0" role="option">5</li>
							                                <li id="answerSheet404121483" data="404121483" class="active"  tabindex="0" role="option">6</li>
							                                <li id="answerSheet404121484" data="404121484" class="active"  tabindex="0" role="option">7</li>
							                                <li id="answerSheet404121486" data="404121486" class="active"  tabindex="0" role="option">8</li>
							                                <li id="answerSheet404121487" data="404121487" class="active"  tabindex="0" role="option">9</li>
							                                <li id="answerSheet404121489" data="404121489" class="active"  tabindex="0" role="option">10</li>
							                        </ul>
														</div>
	</div>
	</div>

<div class="maskDiv popMoveShowHide" style="display:none;" id="recordList">
	<div class="popDiv wid640 popMove">
		<div class="popHead">
			<a href="javascript:;" onclick="closeAnswers();" class="popClose popMoveDele fr"><img src="//mooc1.chaoxing.com/mooc-ans/mooc2/images/popClose.png" /></a>
			<p class="fl fs18 colorDeep">作答记录</p>
		</div>
		<div class="het62"></div>
				<div id="content"></div>
	</div>			
</div>
<div id="aiAssistantId"></div>
<script type="text/javascript" src="//mooc1.chaoxing.com/mooc-ans/mooc2/js/html2canvas.min.js"></script>
<script type="text/javascript" async src="https://stat2-ans.chaoxing.com/stat2/js/cozebot-sdk.min.js"></script>
<script type="text/javascript">
    var imgDomain = 'https://p.ananas.chaoxing.com';

    function initAssistant(exampleId) {
        var courseId = "245175844";
        var classId = "103502387";
        var cpi = "211972379";
        var enc = "cfbb2a4db12cca75f931d209e15cd609";

        loadImgData(exampleId, courseId, classId, cpi, enc)
                .catch((error) => {
                    console.log("Error in initAssistant:", error);
                });
    }

    function loadImgData(exampleId, courseId, classId, cpi, imgBase64Enc) {
        var assistantLockPromise = null;
        if (assistantLockPromise) {
            return assistantLockPromise;
        }

        $.toast({
            type : "loading",
            time : 0,
            content : "生成提问中..."
        });

        assistantLockPromise = new Promise((resolve, reject) => {
            var tempDiv = cloneOriginDiv(exampleId);
            document.body.appendChild(tempDiv);
            processImagesInDiv(tempDiv, courseId, classId, cpi, imgBase64Enc)
                    .then(() => convertDivToImage(tempDiv))
                    .then(function (data) {
                        var imgData = data.toDataURL("image/png", 0.9);
                        showAssistant(imgData);
                    })
                    .finally(() => {
                        tempDiv.parentNode.removeChild(tempDiv);
                        assistantLockPromise = null;
                        $("#dialogToast").remove();
                        resolve();
                    });
        });
        return assistantLockPromise;
    }

    function cloneOriginDiv(id) {
        var originDiv = $("#" + id).find(".aiAreaContent")[0];
        return originDiv.cloneNode(true);
    }

    function processImagesInDiv(tempDiv, courseId, classId, cpi, enc) {
        var promises = [];
        var count = 1;
        $(tempDiv).find("img").each(function (idx, ele) {
            var url = ele.src;
            if (!url.includes(imgDomain)) {
                return true;
            }

            if (count > 50) {
                return false;
            }
            count++;

            var promise = $.ajax({
                "url": _HOST_CP2_ + "/mooc2/work/img-base64?courseId=" + courseId + "&classId=" + classId + "&cpi=" + cpi + "&enc=" + enc,
                "type": "post",
                "dataType": "json",
                "data": {
                    "courseId": courseId,
                    "classId": classId,
                    "cpi": cpi,
                    "enc": enc,
                    "url": url
                },
                success: function (result) {
                    if (result.status) {
                        ele.src = result.data;
                    }
                },
                error: function (jqXHR, textStatus, errorThrown) {
                    console.log("AJAX Error:", textStatus, errorThrown);
                }
            });
            promises.push(promise);
        });
        return Promise.all(promises);
    }

    function convertDivToImage(tempDiv) {
        return html2canvas(tempDiv, {
            ignoreElements: function (element) {
                return element.classList.contains("element-invisible-hidden");
            }
        });
    }

    function showAssistant(imgData) {
        try {
            CozeBotSDK.init({
                appId: "1192651262850",
                botId: "7429626930406326309",
                rootElementId: "aiAssistantId",
                upload: true
            });

            CozeBotSDK.sendToIframeMessage({
                eventName: "callCozeConversation",
                isLastWindow: true
            });

            setTimeout(function () {
                CozeBotSDK.sendToIframeImageBase64({
                    eventName: "sendImgFile",
                    imageBase64: imgData,
                    presetMsg: "讲解一下这道题",
                    model: 1
                });
            }, 1000);
        } catch (e) {
            console.error("Error in CozeBotSDK:", e);
        }
    }
</script><link rel="stylesheet" type="text/css" href="//mooc1.chaoxing.com/mooc-ans/mooc2/css/prompt.css?v=2023-0711-1500"/>
<style>
	.mask-no-bg{background:none!important;}
	.mask-no-bg .popDiv{box-shadow: 0px 4px 36px rgba(0, 0, 0, 0.08);}
</style>
<div class="maskDiv" style="display:none;" id="workpop">
	<div class="popDiv wid440 Marking">
		<div class="popHead" id="workpopFocus" role="alertdialog" tabindex="0">
			<a id="popCloseFocus"  href="javascript:;" class="popClose fr" onclick="popClickFunc()" tabindex="-1"><img src="//mooc1.chaoxing.com/mooc-ans/images/popClose.png" id="popCloseFocusImg" onkeydown="if(event.keyCode == 13){popCloseFocus();}" role="button" tabindex="-1" aria-label="关闭"/></a>
			<p class="fl fs18 colorDeep" tabindex="0" role="option">提示</p>
		</div>
		<div class="het62"></div>
		<p class="popWord fs16 colorIn" id="popcontent" tabindex="0"></p>

		<div class="popBottom">
			<a href="javascript:;" id="popok" class="jb_btn jb_btn_92 fr fs14" tabindex="0" role="button" aria-label="确定"></a>
			<a href="javascript:;" id="popno" class="btnBlue btn_92_cancel fr fs14" onkeydown="popnoFocus();" tabindex="0" role="button" aria-label="取消"></a>
		</div>
		<div class="het72"></div>
			</div>
</div>

<div class="mask-no-bg" style="display:none;" id="worktoast">
	<div class="popDiv wid440 Marking" style="top: 30%;">
		<div class="popHead">
			<a href="javascript:;" class="popClose fr" onclick="toastClickFunc()"><img src="//mooc1.chaoxing.com/mooc-ans/images/popClose.png" /></a>
			<p class="fl fs18 colorDeep">提示</p>
		</div>
		<div class="het62"></div>
		<p class="popWord fs16 colorIn" id="toastcontent"></p>

		<div class="popBottom">
			<a href="javascript:;" id="toastok" class="jb_btn jb_btn_92 fr fs14"></a>
			<a href="javascript:;" id="toastno" class="btnBlue btn_92_cancel fr fs14"></a>
		</div>
		<div class="het72"></div>
	</div>
</div>

<div class="maskDiv" style="display:none;" id="hintPop">
	<div class="popDiv wid440 Marking">
		<div class="popHead">
			<p class="fl fs18 colorDeep">提示</p>
		</div>
		<div class="het62"></div>
		<p class="popWord fs16 colorIn" id="hintCon"></p>
		<div class="popBottom">
			<a href="javascript:;" id="hintOk" class="jb_btn jb_btn_92 fr fs14"></a>
		</div>
		<div class="het72"></div>
	</div>
</div>

<script>
function popClickFunc() {
	$('#workpop').hide();
	if($('.popSetupShowHide').length > 0){
		$('.popSetupShowHide').fullFadeOut();
	}
}

function toastClickFunc() {
	$('#worktoast').hide();
	if($('.popSetupShowHide').length > 0){
		$('.popSetupShowHide').fullFadeOut();
	}
}


function workPop(content, okTent, cancelTent, okcallback, cancelCallback) {
	var ta = $("#workpop");

	if($('.popSetupShowHide').length > 0){
		$(".popSetupShowHide").fullFadeIn();
	}

	ta.show();
	
	$("#popcontent").html(content);
	var popokHiddenRead = $("#popokHiddenRead");

	var ok = $("#popok");
	ok.html(okTent);
	ok.unbind();
	ok.on("click", function() {
		// 无障碍单位走定制,延迟语音读取处理
		if("0" == "1") {
			popokHiddenRead.attr("tabindex","0");
			if (content && content != '很遗憾，未达到及格线，请重做') {
				popokHiddenRead.focus();
			}
			setTimeout(function() {
				okcallback && okcallback(ta);
				popokHiddenRead.attr("tabindex","-1")
				ta.hide();
				if($('.popSetupShowHide').length > 0) {
					$(".popSetupShowHide").fullFadeOut();
				}
			}, 1000)
		} else {
			okcallback && okcallback(ta);
			ta.hide();

			if($('.popSetupShowHide').length > 0) {
				$(".popSetupShowHide").fullFadeOut();
			}
		}
	});

	var cancel = $("#popno");
	cancel.html(cancelTent);
	cancel.unbind();
	cancel.on("click", function() {
		cancelCallback && cancelCallback(ta);
		ta.hide();
		if($('.popSetupShowHide').length > 0) {
			$(".popSetupShowHide").fullFadeOut();
		}
	});
	if("0" == "1") {
		$("#workpopFocus").focus();
	}
}

function workToast(content, okTent, cancelTent, okcallback, cancelCallback) {
	var ta = $("#worktoast");

	if($('.popSetupShowHide').length > 0) {
		$(".popSetupShowHide").fullFadeIn();
	}

	ta.show();

	$("#toastcontent").html(content);

	var ok = $("#toastok");
	ok.html(okTent);
	ok.unbind();
	ok.on("click", function() {
		okcallback && okcallback(ta);
		ta.hide();

		if($('.popSetupShowHide').length > 0) {
			$(".popSetupShowHide").fullFadeOut();
		}
	});

	var cancel = $("#toastno");
	cancel.html(cancelTent);
	cancel.unbind();
	cancel.on("click", function() {
		cancelCallback && cancelCallback(ta);
		ta.hide();
		if($('.popSetupShowHide').length > 0) {
			$(".popSetupShowHide").fullFadeOut();
		}
	});
}

function workHint(content, okTent, okcallback) {
	var ta = $("#hintPop");

	if($('.popSetupShowHide').length > 0) {
		$(".popSetupShowHide").fullFadeIn();
	}

	ta.show();

	$("#hintCon").html(content);

	var ok = $("#hintOk");
	ok.html(okTent);
	ok.unbind();
	ok.on("click", function() {
		okcallback && okcallback(ta);
		ta.hide();

		if($('.popSetupShowHide').length > 0) {
			$(".popSetupShowHide").fullFadeOut();
		}
	});
}

function popFocus() {
	if("0" != "1") {
		return;
	}
	$("#popCloseFocusImg").attr("tabindex","0");
	$("#popCloseFocus").focus();
}
function popCloseFocus() {
	if("0" != "1") {
		return;
	}
	$('#workpop').hide();
	if($('.popSetupShowHide').length > 0) {
		$('.popSetupShowHide').fullFadeOut();
	}
	$("#popCloseFocusImg").attr("tabindex","-1");
}
function popnoFocus() {
	if("0" != "1") {
		return;
	}
	if(event.keyCode == 9){
		popFocus();
	}
	if(event.keyCode == 13){
		$("#popCloseFocusImg").attr("tabindex","-1");
	}
}

</script><!-- 代码高亮开始 start -->
<link type="text/css" href="//mooc1.chaoxing.com/mooc-ans/views/mooc2/ueditor/insertcode/css/default.min.css" rel="stylesheet" />
<script type="text/javascript" src="//mooc-res1.chaoxing.com/mooc-ans/js/highlight.min.js" charset="utf-8"></script>
<script type="text/javascript" src="//mooc-res1.chaoxing.com/mooc-ans/js/highlightjs-line-numbers.js" charset="utf-8"></script>
<style>
    pre,code {display: block;background: #F7F8FA;border: 1px solid #E1E3E5; font-size: 14px; border-radius: 4px; padding: 30px 20px; margin: 20px 0; font-family: CXHackSafariFont,CXEmojiFont,CXChineseQuote,-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Tahoma, Arial,Segoe UI,PingFang SC, Hiragino Sans GB,Microsoft YaHei,sans-serif,Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol,Noto Color Emoji; }
    pre{overflow-x: auto;margin:.5em 0;padding:.4em .6em;border-radius:8px;background:#f8f8f8;}
    pre.autolinebreak{white-space: normal; }
    code.hljs{background: #F7F8FA;}
    pre code,pre pre{ margin: 0; background: none;border: none;}/*padding: 0;*/
    .code-tool-wrap{padding-bottom: 1em;left: 20px; top: 2px; width: calc(100% - 40px); height: 24px; font-size: 14px; user-select: none;}
    .code-lang{ display:inline-block; color: #ACB4BF; }
    .ans-cc .ans-noborder th,.ans-cc .ans-noborder td{border-color:transparent;}
    .ans-cc pre,.ans-cc code{ position: relative; padding: 0px 20px 30px; margin: 20px 0;border: 1px solid #E1E3E5; border-radius: 4px; color: #474C59; background: #F7F8FA; font-size:14px; font-family: CXHackSafariFont,CXEmojiFont,CXChineseQuote,-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Tahoma, Arial,Segoe UI,PingFang SC, Hiragino Sans GB,Microsoft YaHei,sans-serif,Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol,Noto Color Emoji;  }
    .ans-cc pre{overflow: auto}
    .ans-cc pre code,.ans-cc pre pre{ padding: 0; border:none; margin: 0; background: none;border-radius: 0;}
    .ans-cc pre.autolinebreak{white-space: pre-wrap;word-wrap: break-word;}
    .hljs-ln-numbers {text-align: center;color: #ccc;border-right: 1px solid #CCC;vertical-align: top;padding-right: 5px !important;}
    .hljs-ln-code {padding-left: 5px !important;}
    /* 全局去掉表格样式 */
    .ans-cc pre code table tr td {border: solid 0px #cfd4dc;text-align: left}
    /* 作业表格适配，考试表格适配 */
    .ans-cc pre table{table-layout: unset;}
    .ans-cc pre code table{table-layout: unset;}
    /* pre 标签未换行 */
    .ans-cc pre.line-numbers{clear:both}
    .ans-cc pre{clear:both}

    /* app作业库 考试库 查看样式 */

    .hljs-link, .hljs-operator, .hljs-regexp, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-symbol, .hljs-template-variable, .hljs-variable {
        color: #ab5656 !important;
    }
    .hljs-deletion, .hljs-number, .hljs-quote, .hljs-selector-class, .hljs-selector-id, .hljs-string, .hljs-template-tag, .hljs-type {
        color: #800 !important;
    }
    /* 章节作业 */
    .hljs-ln span{margin-right:0}

    /* 学习通颜色覆盖 */
    .hljs-type{color:#800 !important;}
    .hljs-section,.hljs-title{color:#800 !important;font-weight:700}
    /* 背景颜色 */
    .ans-cc pre code td{background-color: unset;}
</style>
<link type="text/css" href="//mooc1.chaoxing.com/mooc-ans/css/newEditor.css?v=2023-0609-1900" rel="stylesheet" />
<script>
    /**
     * 保证最后加载
     */
    $(function () {
        var pre = $(".ans-cc").find('pre')
        if(pre){
            pre.each(function () {
                // debugger
                var me = this;
                var lang = me.firstChild && me.firstChild.lang;
                if (typeof (lang) == 'undefined' || lang == null || lang == "" ) {
                    lang = me.firstChild && me.firstChild.className;
                    if (typeof (lang) != 'undefined' && lang != null && lang != "" ) {
                        var split = lang.split("-");
                        lang = split[1];
                        if (lang == 'plain') {
                            lang = 'Plain Text';
                        }
                    } else {
                        lang = 'Plain Text';
                    }
                }
                me.innerHTML = '<div class="code-tool-wrap clearfix"><div class="code-lang fl">' + lang
                        + '</div><div class="copy1 fr"><i></i><span></span></div></div>' + me.innerHTML;
                me.innerHTML = me.innerHTML.replace(/<br\s*\/?>/g, "\n");
            })
        }

        try {
            hljs.initHighlightingOnLoad();
            hljs.initLineNumbersOnLoad({ singleLine:true });
        } catch (e) {

        }
    })
</script>
<!-- 代码高亮结束 end --><script>

$(function () {
	$(".viewAttach").find("span:first").each(function () {
		$(this).attr("onclick", "viewMark(this);");
	});
});

var courseId = $("#courseId").val();
var classId = $("#classId").val();
var cpi = $("#cpi").val();
var workId = $("#workId").val();
var answerId = $("#answerId").val();
var enc = $("#enc").val();

function redoWork() {
	
	var redoTimes = 0 + 0 - 0;
	var msg = "你还可以重做" + redoTimes + "次，确认重做后，前一次作答记录会被覆盖，作业成绩以本次成绩为最终成绩，是否继续？";
	
	workPop(msg, "重做", "取消", function() {
		$.ajax({
			type : "get",
			url : _HOST_CP2_ + "/work/phone/redo",
			dataType : "json",
			data : {
				courseId : courseId,
				classId : classId,
				cpi : cpi,
				workId : workId,
				workAnswerId : answerId
			},
			success : function(data) {
				if(data.status == 1) {
					location.href = "/mooc-ans/mooc2/work/dowork?courseId=245175844&classId=103502387&cpi=211972379&workId=39636971&answerId=54558999&knowledgeId=&jobid=&standardEnc=c01006e943fb716de80bbbde1bdd800f&enc=240cb44c3fb934bf9b9c81a0f755b059";
				} else {
					$.toast({
						type : 'failure',
						content : data.msg
					});
				}
			}
		});
	});
}

var recordLock = 0
function answerList() {
	if(recordLock == 1) {
		return;
	}
	recordLock = 1;
	
	$.ajax({
		type : "get",
		url : _HOST_CP2_ + "/mooc2/work/answer-list",
		dataType : "html",
		data : {
			courseId : courseId,
			classId : classId,
			cpi : cpi,
			workId : workId,
			answerId : answerId,
			enc : enc
		},
		success : function(data) {
			$("#content").html(data);
			$("#recordList").show();
			MoveFixed();
		}
	});
}

function closeAnswers() {
	$("#recordList").hide();
	recordLock = 0;
}

function MoveFixed() {
	$('.popMove').css({
		top : function() {
			return ($(window).height() - $(this).height()) / 2;
		},
		left : function() {
			return ($(window).width() - $(this).width()) / 2;
		}
	});
	
	$("#boxscroll").niceScroll({
		cursorborder : "",
		cursorcolor : "#D9DDE1",
		boxzoom : false
	});
}

</script>
</body>
</html>